package com.jiutianniao.p2p.acctrans.core.vo;

import com.jiutianniao.p2p.trans.client.enums.AccountActionEnum;
import com.jiutianniao.p2p.trans.client.enums.FreezeBalanceTypeEnum;
import com.jiutianniao.p2p.trans.client.enums.RecordModelEnum;
import com.jiutianniao.p2p.trans.client.enums.SubTransCodeEnum;
import com.jiutianniao.p2p.trans.client.model.TransInfo;

/**
 * 可能要锁账户时的临时VO
 */
public class LockAccountVO {

	/** 账号 */
	private final String accountNo;
	/** 业务代码 */
	private final SubTransCodeEnum subTransCode;
	/** 冻结类型 */
	private final FreezeBalanceTypeEnum freezeType;
	/** 外部批次号 */
	private final String outBatchNo;
	/**
	 * 操作动作 注意:预处理阶段,还原阶段这个值只可能是Debit或者Credit
	 */
	private final AccountActionEnum action;
	/**
	 * 借方记账模式
	 */
	private final RecordModelEnum debitRecordModel;

	public LockAccountVO(String accountNo, TransInfo transInfo,
			AccountActionEnum action) {
		super();
		this.accountNo = accountNo;
		this.subTransCode = transInfo.getSubTransCode();
		this.freezeType = transInfo.getFreezeType();
		this.outBatchNo = transInfo.getOutBatchNo();
		this.debitRecordModel = transInfo.getDebitRecordModel();
		this.action = action;
	}

	public String getAccountNo() {
		return accountNo;
	}

	public SubTransCodeEnum getSubTransCode() {
		return subTransCode;
	}

	public String getOutBatchNo() {
		return outBatchNo;
	}

	public AccountActionEnum getAction() {
		return action;
	}

	public FreezeBalanceTypeEnum getFreezeType() {
		return freezeType;
	}

	public RecordModelEnum getDebitRecordModel() {
		return debitRecordModel;
	}
}
